<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="修改模块" bodyClass="white-bg" libs=["bootstrapSelect"]/>
<div class="wrapper wrapper-content ibox-content">
<@f.form id="form-sysModule-edit" class="form-horizontal">
    <@f.hidden id="id" name="id" value="${sysModule.id?default('')}"/>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "模块名称"/>：</label>
        <div class="col-sm-8">
            <@f.input name="moduleName" value="${sysModule.moduleName?default('')}" required=true/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "模块编码"/>：</label>
        <div class="col-sm-8">
            <@f.input name="moduleCode" value="${sysModule.moduleCode?default('')}" required=true/>
        </div>
    </div>
    <div class="form-group">
    <label class="col-sm-3 control-label"><@ctx.i18n text = "图标"/>：
        <a tabindex="0" role="button" data-toggle="popover" data-trigger="focus" data-html="true" data-placement="bottom"
           data-content="自定义获取图标:<a href='http://www.fontawesome.com.cn/faicons/' target='_blank'>http://www.fontawesome.com.cn/faicons/</a>">
            <i class="fa fa-question-circle-o" style="color: orange"></i></a>
    </label>
    <div class="col-sm-8">
        <@f.iconselect name="icon" value="${sysModule.icon?default('')}" placeholder="选择图标"/>
    </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "模块描述"/>：</label>
        <div class="col-sm-8">
            <@f.textarea name="description" value="${sysModule.description?default('')}" required=true/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "主类全名"/>：</label>
        <div class="col-sm-8">
            <@f.input name="mainClassName" required=true value="${sysModule.mainClassName?default('')}"
            helpTip = "该模块的状态验证类，如果该类检测不存在，则该模块状态提示 \"未安装\",验证原理：Class.forName()"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><span style="color: red; ">*</span><@ctx.i18n text = "版本"/>：</label>
        <div class="col-sm-8">
            <@f.input name="currentVersion" value="${sysModule.currentVersion?default('')}" required=true/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-3 control-label"><@ctx.i18n text = "备注信息"/>：</label>
        <div class="col-sm-8">
            <@f.textarea name="remark" value="${sysModule.remark?default('')}"/>
        </div>
    </div>
</@f.form>
</div>
<@footer>
    <script type="text/javascript">
        var prefix = baseURL + "sys/module";
        $("#form-sysModule-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if (opt.validate.form()) {
                opt.operate.save(prefix + "/edit", $('#form-sysModule-edit').serialize());
            }
        }
    </script>
</@footer>
</@pageTheme>
